Skip to content

Conversation

@medhatiwari
Copy link
Contributor

@medhatiwari medhatiwari commented Oct 28, 2025

Summary

Fix test discovery failure in IIS.FunctionalTests when running on non-Windows platforms.

Issue

CI has observed test failures on Linux in multiple IIS test suites:

  • IIS.FunctionalTests (2 failures)
  • IISExpress.FunctionalTests (2 failures)

Both fail during test discovery with PlatformNotSupportedException because SkipIfNotAdminAttribute calls WindowsIdentity.GetCurrent() without checking the platform first.

Fix

Add platform check in SkipIfNotAdminAttribute.IsMet before calling Windows-specific APIs.

cc: @giritrivedi

@github-actions github-actions bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Oct 28, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Oct 28, 2025
@dotnet-policy-service
Copy link
Contributor

Thanks for your PR, @@medhatiwari. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@adityamandaleeka
Copy link
Member

Can you point to where these CI failures occurred? As in your other PR, there are other checks which should prevent things from getting this far (e.g. https://github.com/dotnet/aspnetcore/blob/main/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/RequiresIISAttribute.cs#L43)

@dotnet-policy-service
Copy link
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants